1. Field of the Invention
The present invention relates generally to data storage, and specifically to file systems.
2. Description of Related Art
Files are typically stored on disk in a hierarchical data structure called a file system. The file system includes a root directory and objects such as files, links, and subdirectories. The hierarchical arrangement was popularized in the UNIX operating system, and was also adopted in the Microsoft MS-DOS operating system for personal computers. The hierarchical arrangement survives today in various UNIX-based file systems, the Microsoft Windows operating system, and many other operating systems.
In a network environment, a network file server typically stores multiple file systems. A network client may access a specified file system using standard protocols such as the Network File System (“NFS”) Protocol and the Common Internet File System (“CIFS”) Protocol. NFS is described in Request for Comments (“RFC”) 1094, Sun Microsystems, Inc., “NFS: Network File Systems Protocol Specification,” March 1989, incorporated herein by reference. The CIFS protocol is described in Paul L. Leach and Dilip C. Narik, “A Common Internet File System,” Microsoft Corporation, Dec. 19, 1997, incorporated herein by reference.
A network storage system typically includes an array of disk drives and a storage controller for accessing the disk drives in response to client requests for file access. The storage controller is programmed with a number of software layers including a file system layer for mapping file names to logical storage locations, and a storage layer for cache management and mapping of logical storage locations to physical storage locations on disk. In a very high capacity system, the storage controller may have multiple processing units, typically dedicated to file system layer functions or storage layer functions. For example, the file system layer functions may be performed by multiple commodity computers, and the storage layer functions may be performed by a cached disk array, as described in Vahalia et al., U.S. Pat. No. 5,893,140, issued Apr. 6, 1999, and entitled “File Server Having A File System Cache And Protocol For Truly Safe Asynchronous Writes,” incorporated herein by reference.
One problem with the use of multiple processing units for performing file system layer functions is conflict between concurrent file access operations. For example, data consistency problems may arise if concurrent access to a read/write file is permitted through more than one processing unit. One solution to this problem, as described in the Vahalia et al. U.S. Pat. No. 5,893,140, is to store locking information in the data storage of the network file server. Another solution to the problem, as described in Vahalia et al. U.S. Pat. No. 6,192,408 issued Feb. 20, 2001, incorporated herein by reference, is to assign exclusive access rights for each read/write file system to a respective one of the processing units. When a processing unit receives a client request for access to a read/write file and finds that another processing unit has exclusive access rights to the file system including the read/write file, it forwards the client request to the processing unit having exclusive access rights to the file system, and the processing unit having exclusive rights to the file system accesses the read/write file on behalf of the client. Still another solution to the problem, as described in Xu et al. U.S. Pat. No. 6,324,581 issued Nov. 27, 2001, is to assign exclusive metadata management rights for each read/write file system to a respective one of the processing units. When a processing unit receives a client request for access to a read/write file and finds that another processing unit has exclusive metadata management rights to the file system including the read/write file, it forwards a metadata request to the processing unit having exclusive metadata management rights to the file system, and the processing unit having exclusive metadata management rights responds by placing a lock on the read/write file and returning metadata of the file. The processing unit that received the client request uses the metadata to formulate a data access command for accessing the file data in the file system over a bypass data path that bypasses the processing unit having exclusive metadata management rights to the file system.
Although it is preferred to give a respective one of the processing units exclusive rights to each read/write file system for preventing data consistency problems, there could be a poor match between the number and size of the file systems stored in the network file server and the number of processing units that may be assigned exclusive access or management rights to the file systems. In other words, there is a need for an efficient way of configuring exclusive rights of processing units in the network file server to the file systems stored in the network file server.